import { NextResponse } from "next/server"

export async function GET() {
  // 实际实现中会从数据库获取用户资料
  return NextResponse.json({
    success: true,
    data: {
      id: "123",
      name: "音乐爱好者",
      bio: "热爱音乐，分享快乐",
      avatar: "/placeholder.svg",
      cover: "/placeholder.svg?height=400&width=1920",
      stats: {
        followingCount: 32,
        followersCount: 128,
        songsCount: 1,
        playlistsCount: 1,
        albumsCount: 0,
        mvsCount: 1,
      },
    },
  })
}

export async function PUT(request: Request) {
  const formData = await request.formData()
  const name = formData.get("name") as string
  const bio = formData.get("bio") as string
  // 处理文件上传逻辑...

  return NextResponse.json({
    success: true,
    data: {
      id: "123",
      name: name || "用户名",
      bio: bio || "这个人很懒，什么都没有写~",
      avatar: "/images/user-avatar.jpg",
      cover: "/images/user-cover.jpg",
      stats: {
        followingCount: 32,
        followersCount: 128,
        songsCount: 1,
        playlistsCount: 1,
        albumsCount: 0,
        mvsCount: 1,
      },
    },
  })
}

